<template>
	<div class="role" v-if="taskListVisible">
		<el-dialog :title="title" :visible="taskListVisible" :close-on-click-modal="false" width="900px" top="5vh" :before-close="handleClose" append-to-body>
			<div class="tab">
				<el-table
					v-if="initTableList"
					class="marT"
					:data="initTableList"
					:border="true"
					:header-cell-style="{background:'#eef1f6'}"
					lazy
					@selection-change="handleSelectionChange"
					row-key="id">
					<el-table-column type="selection" align="center" style="width: 55px;">
					</el-table-column>
					<el-table-column align="center" property="case_name" label="用例标题" width="300"></el-table-column>
					<el-table-column align="center" property="priority" label="优先级"></el-table-column>
					<el-table-column align="center" property="test_type" label="测试类型"></el-table-column>
					<el-table-column align="center" property="status_show" label="状态"></el-table-column>
				</el-table>
			</div>
			<div slot="footer" class="dialog-footer">
				<el-button @click="handleClose">取 消</el-button>
				<el-button type="primary" @click="add">确 定</el-button>
			</div>
		</el-dialog>
	</div>
</template>


<script>

export default {
	name: 'addForm',
	components: {},
	data() {
		return {
			title:'测试样例选择',
			taskListVisible:false,
			initTableList:[],
			showList:[]
		}
	},
	methods:{
		handleClose(){
			this.taskListVisible = false
		},
		initData(argm){
			this.initTableList = argm
		},
		handleSelectionChange(evl){
			console.log(evl,121212)
			this.showList = evl
		},
		add(){
			this.$emit('func', this.showList)
			this.taskListVisible = false
		}
	}
}
</script>

<style scoped>
.tab{
	margin-top: 22px;
	border-top: 1px solid #eee;
	padding-top: 10px;
	height: 430px;
	overflow:scroll;
}
</style>
